<template>
  <div class="account-login">
    <div class="list">
      <div class="label">账号</div>
      <div class="value">
        <input type="text" v-model="state.username" @keyup.enter="sign" />
      </div>
    </div>
    <div class="list">
      <div class="label">密码</div>
      <div class="value">
        <input type="password" v-model="state.password" @keyup.enter="sign" />
      </div>
    </div>
    <div class="remenber">
      <el-checkbox v-model="state.remenber" label="记住密码" />
    </div>
    <button class="sign" @click="sign" @keyup.enter="sign">登 陆</button>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue"
import { useRouter } from "vue-router"

const router = useRouter()
const state = reactive({
  username: "",
  password: "",
  remenber: false,
})

function sign() {
  router.push({
    path: "/doc",
  })
}
</script>

<style lang="scss" scoped>
.account-login {
  height: calc(100% - 100px);
  padding: 0 60px;

  .list {
    font-size: 12px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #000000;

    .label {
      opacity: 0.6;
    }

    .value {
      height: 28px;
      border-bottom: 1px solid #ccc;

      input {
        width: 100%;
        height: 100%;
        border: none;
        outline: none;

        &:focus {
          border: none;
          outline: none;
        }
      }
    }

    &:first-child {
      margin: 45px 0 23px 0;
    }
  }

  .remenber {
    margin: 10px 0 28px 0;
  }

  .sign {
    width: 100%;
    height: 30px;
    background: #017bff;
    border-radius: 2px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
    user-select: none;
    cursor: pointer;
    outline: none;
    border: none;

    &:focus {
      outline: none;
    }
  }
}
</style>
